﻿
using System;
using System.Collections.Generic;
using Jayden.Dll.Web.Enums;
using Jayden.Dll.Web.HtmlControls.Descriptions;
namespace Jayden.Dll.Web.HtmlControls
{
	public class Meta : HtmlControls.Generics.HtmlElement
	{
		public Meta() : base(MetaDescription.Instance) { }

		public string Name { get { return this["name"]; } set { this["name"] = value; } }
		public string Content { get { return this["content"]; } set { this["content"] = value; } }
		public string HttpEquiv { get { return this["content"]; } set { this["content"] = value; } }
		public string CharSet { get { return this["charset"]; } set { this["charset"] = value; } }
	}
	public class MetaDescription : HtmlElementDescription
	{
		public static readonly MetaDescription Instance = new MetaDescription();
		private MetaDescription() : base("meta", HtmlVersion.Html4, false, false) { }
		public override Type ControlType { get { return typeof(Meta); } }
		public override bool IsMetaDataElement { get { return true; } }
		public override string Description { get { return "multipurpose element for representing metadata."; } }
		public override IEnumerable<HtmlElementDescription> PermittedElements { get { yield break; } }
		public override IEnumerable<HtmlElementDescription> PermittedParents { get { yield return HeadDescription.Instance; } }
	}
}
